<?php
//$url="https://mp.weixin.qq.com/s?__biz=MzI0MzY5NTQ1Nw==&mid=2247491243&idx=1&sn=d60f0da48cc16cf8372bf562c608d593&chksm=e96874a5de1ffdb3c6d1b81b79f794a43bc5393814a57be56d70d2506b04fd095c8a7b9a44dd#rd";

$url="https://mp.weixin.qq.com/s?__biz=Mzg2NjY3OTI0NA==&mid=2247484560&idx=1&sn=c13cb4cc44c97aff22564215e5dabbf2&chksm=ce466433f931ed25420703193bd05a24abbe16621c3dc5dfb0aed6d98cb7c0a7a5ccf5e49087#rd";
$content =file_get_contents($url);
file_put_contents('wxtest2.html',$content);
echo $content;
function getcurl($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
    curl_setopt($ch, CURLOPT_MAXREDIRS,20);
    $file_contents = curl_exec($ch);
    return $file_contents;
    curl_close($ch);
}
?>